package cn.jtcoding.xhs.controller;

import cn.jtcoding.xhs.model.vo.TopicVO;
import cn.jtcoding.xhs.service.TopicService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author jason.tang
 * @Date 2020/8/5 11:18
 * @Desc
 */

@Api(tags = "话题")
@RestController
@RequestMapping("/topics")
public class TopicController {

    @Autowired
    private TopicService topicService;

    @ApiOperation(value = "获取全部话题", notes = "")
    @GetMapping("")
    public List<TopicVO> getTopicList() {
        return topicService.getTopicList();
    }
}
